import request from '@/config/axios'

// 基本配置 VO
export interface BasicConfigVO {
  id: number // 主键
  userAgreement: string // 用户隐私协议
  assessmentRisk: string // 心理评测风险
  userDefaultAvatar: string // 用户默认头像
  centerHotline: string // 心理中心热线
}

// 基本配置 API
export const BasicConfigApi = {
  // 查询基本配置分页
  getBasicConfigPage: async (params: any) => {
    return await request.get({ url: `/business/basic-config/page`, params })
  },

  // 查询基本配置详情
  getBasicConfig: async (id: number) => {
    return await request.get({ url: `/business/basic-config/get?id=` + id })
  },

  // 新增基本配置
  createBasicConfig: async (data: BasicConfigVO) => {
    return await request.post({ url: `/business/basic-config/create`, data })
  },

  // 修改基本配置
  updateBasicConfig: async (data: BasicConfigVO) => {
    return await request.put({ url: `/business/basic-config/update`, data })
  },

  // 删除基本配置
  deleteBasicConfig: async (id: number) => {
    return await request.delete({ url: `/business/basic-config/delete?id=` + id })
  },

  // 导出基本配置 Excel
  exportBasicConfig: async (params) => {
    return await request.download({ url: `/business/basic-config/export-excel`, params })
  },
}